<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/validate.jsp"%>
<%

    String dangerNo = input.getDesc("dangerNo","");//危急值编码
    String handleId = input.getDesc("handleId","");//处理人id
    String handleName = input.getDesc("handleName","");//处理人名称
    String handleContent = input.getDesc("handleContent","");//处理内容
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    Date date  = new Date();

    String hql  = "from Danger where dangerNo='" + dangerNo + "'";
    List<Danger> dangerList = QBuilder.db("basedb").queryHql(hql);
    if(dangerList == null || dangerList.size() ==0){
        msg.setErrmsg("没有数据");
        Tools.encryptPrint(out,msg.toJson());
        return;
    }
    Danger danger = dangerList.get(0);
    //修改
    danger.setHandleId(handleId);
    danger.setHandleName(handleName);
    danger.setHandleContent(handleContent);
    danger.setHandleTime(sdf.format(date));



    DBTools.db("basedb").modItem(dangerList);
    msg.put("dangerList",dangerList);
    Tools.encryptPrint(out,msg.toJson());
%>
